A wireless network (for example, a WiFi network) has become an indispensable communication tool, and at present, there are more and more intelligent devices, such as a mobile phone, a notebook computer, a tablet computer, and a camera device, supporting Internet surfing through a wireless network. At present, all of the intelligent devices connect to a wireless network in the following manner:
An intelligent device searches for a nearby wireless network, selects, according to an operation input by a user, a wireless network, receives password information input by the user, and then connects to the wireless network by using the password information.
In the foregoing technology, the user needs to input a password, and a password of a wireless network is usually complex, for example, a password including letters, numbers, and special symbols. In this way, a process of inputting a password by the user is very troublesome and even an input error may occur. Hence, a fast connection to a wireless network cannot be achieved in the foregoing technical solution.